The instantaneous alternating current (AC) power is a continuously varying sinusoidal wave. Therefore, the instantaneous light intensity function of a lamp also varies accordingly and can be modeled as:I′(t)=I+A|cos [ω(t+θ)]|  (1)where I′ is the observed instantaneous light intensity, I is a constant term respect to time, A|cos [ω(t+θ)]| is a varying term and is due to temporal fluctuations in ambient light , A is a constant, ω=2πf is the power frequency at either 50 Hz or 60 Hz, t is the time, and θ is the initial phase. The varying term causes artifacts in a captured image. This phenomenon is known as light flicker. I′(t) is a periodic function. Because of the absolute term, its period is 1/(2f), half of the cosine period.
Light flicker could cause noticeable artifacts during image and video capture. This is because the image pixel value is proportional to the integral of the instantaneous light function:
                              Y          ⁡                      (                          α              ,              T                        )                          =                                            ∫                              α                -                θ                                            α                -                θ                +                T                                      ⁢                                          [                                  I                  +                                      A                    ⁢                                                                                        cos                        ⁡                                                  (                                                      ω                            ⁡                                                          (                                                              t                                +                                θ                                                            )                                                                                )                                                                                                                                          ]                            ⁢                                                          ⁢                              ⅆ                t                                              =                                    ∫              α                              α                +                T                                      ⁢                                          [                                  I                  +                                      A                    ⁢                                                                                        cos                        ⁡                                                  (                          ωt                          )                                                                                                                                          ]                            ⁢                                                          ⁢                              ⅆ                t                                                                        (        2        )            where α−θ is the starting time or the initial phase, T is the integration time or the camera exposure time, Y is the captured image pixel value. Y(α,T) has a period of τ=½f with respect to T, where τ is the half of the power frequency period. From this equation, it can be seen that the Y value changes as a function of α, except when T is an integer multiple of τ, 1/(2f). In that case, the Y value stays the same regardless of the initial phase α.
Depending on a camera's shutter mechanism, the light flicker causes various artifacts in the image, if T is not set to an integer number of the period τ. There are two popular types of shutters, namely snapshot and rolling shutter. In the snapshot case, all rows in the image are exposed at the same starting and ending time. If a sequence of video frames or still images is captured in the snapshot mode, each frame is exposed at a different time. Pixel values then vary from frame to frame even if the scene is static, which is easily noticeable during video playback.
In the rolling shutter case, only a number of rows are exposed at any given time. Imagine an exposure window that covers the exposed rows. The width of the window is the number of rows. The window moves one row at a time from the top to the bottom, and then rotates back to the top. At each window location, pixel values in the longest exposed row are read out. The exposure time is nβ, where n is the number of rows in the window and β is the time difference between the read-outs of two consecutive rows. β is usually constant within each image. Because each row is exposed at a different starting time, the pixel values shift from row to row. The net effect is a vertical periodic signal being superimposed on the original image. FIG. 1 illustrates this effect. The image is generated based on Equation (2). A constant l is used for all the pixel location. In other words, without the flicker, the image should be flat. Due to the flicker, sinusoidal variations along the vertical direction can be observed
When the magnitude of the fluctuation A is small, the bright and dark stripes in FIG. 1 are less noticeable in a single image. However, in a sequence of video frames, because of the phase difference between two consecutive frames, the bright and dark stripes move from frame to frame and are thus more noticeable.
One method to correct for flicker artifacts in a captured image is to set the exposure time T to an integer number of the period, 1/(2f). However, with this method the allowable exposure time is constrained to a fixed set of values. In the example of 60 Hz power line, they are: 1/120 s, 2/120 s, 3/120 s. Any values between those numbers would not be allowed. Moreover the exposure time cannot be set to be smaller than 1/120 s without avoiding the flicker.